<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});
Route::any('index','admin\IndexController@index');
Route::group(['middleware'=>['web']],function(){
    Route::any('admin/login','admin\LoginController@login');
    Route::any('admin/register','admin\RegisterController@register');
});


Auth::routes();

Route::get('/home', 'HomeController@index');


//user账户登录
Route::get('/home', ['uses' => 'UserController@getHome']);
Route::controller('/user','Auth\LoginController');
Route::controller('/password','Auth\ResetPasswordController');

//admin账户登录
Route::get('/admin/home', ['uses' => 'AdminController@getHome']);
Route::controller('/admin','Auth\AdminAuthController');
Route::controller('/admin/password','Auth\AdminAuthController');
